<style>
	th{text-align: center !important;}
</style>
<!-- 快递号 -->
<div class="modal fade" id="myModa_base_fc" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="margin-top: 80px">
	<div class="modal-dialog chery_dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel_title">

				</h4>
			</div>
			<div class="modal-footer" style="text-align:center">
				<div class="fc_content base_fc" >
					<form id="from_base_fc" action="#" method="GET">
						<div id="base_fc_content"></div>
						<div id="base_fc_content2"></div>
						<!--<input class="form-control width200" type="text" id="kdh_num" name="form[kdh_num]" style="width: 300px !important">-->
						<input type="hidden" name="action" value="update_kjcx_contents" />
						<input type="button" class="action-button" onclick="check_user_input_base_fc('base_fc',this)" value="提交" style="float: left;margin-top: 20px;"/>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 快递号 -->

<!-- 分配收费人员 -->
<div class="modal fade" id="myModa_fc_user" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="margin-top: 80px">
	<div class="modal-dialog chery_dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="money">

				</h4>
			</div>
			<div class="modal-footer" style="text-align:center">
				<div class="fc_content fc_user" >
					<form id="from_fc_user" action="#" method="post">
						<select id="fc_user_select"  name="form[now_user_name]" multiple style="width:100%;height: 200px;"></select>
						<div id="fc_user_content"></div>
						<input type="hidden" name="action" value="update_kjcx_contents" />
						<input type="button" class="action-button" onclick="check_user_input_base_fc('fc_user',this)" value="提交" style="margin-top: 20px;"/>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 分配收费人员 -->

<!-- 科技查新收费浮层 -->
<div class="modal fade" id="myModa_kjcx_sf" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="margin-top: 80px">
	<style>
		.no-margin tr td {
			border: 0px solid #000 !important;
		}
		.mo_dan{
			text-align: right;
			line-height: 33px !important;
		}
		.width200{
			width: 200px !important;
		}
	</style>
	<div class="modal-dialog chery_dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="">
					收费
				</h4>
			</div>
			<div class="modal-footer" style="text-align:center">
				<div class="fc_content kjcx_sf" style="display:none">
					<form id="from_get_kjcx_sf" action="#" method="GET">
						<table class="table table-striped no-margin" border="0" cellspacing="0" cellpadding="0" >
							<tr>
								<td class="mo_dan">收费模式：</td>
								<td>
									<select id="sf_kjcx_model1" class="form-control width200" onchange="change_sf_model_kjcx('')" name="form[fkfs]">
										<option value="1">网上支付</option>
										<option value="2">汇款</option>
										<option value="3">现金支付</option>
										<option value="4">校内转账</option>
									</select>
									<span id="sfgs_kjcx" style="display:none">收费公式：</span>
								</td>
							</tr>
							<tr>
								<td class="mo_dan">查新号：</td>
								<td><input type="text" name="form[cxh]" id="kjcx_sf_cxh"  class="form-control width200"  value="" /></td>
							</tr>
							<tr>
								<td class="mo_dan">期望完成日期：</td>
                                <td><input type="text" name="form[lqrq]" id="kjcx_sf_lqrq" readonly="readonly" class="form-control width200"  value='' onfocus="
						             WdatePicker({minDate:'%y-%M-{%d}',disabledDays:[6,0],
						             skin:'whyGreen',dateFmt:'yyyy-MM-dd',
						             minDate:'{:date('Y-m-d',time()+3600*24*2)}',
						             maxDate:'{:date('Y-m-d',time()+3600*24*28)}'})" ></td>
							</tr>
							<tr>
								<td class="mo_dan">基础费：</td>
								<td><input type="text" name="form[cxf]" id="kjcx_sf_cxf"  class="form-control width200"  value=""  onkeydown="onlyNum();" onkeyup="get_Totalnum('kjcx_sf')"  /></td>
							</tr>
							<tr>
								<td class="mo_dan"> 加急费：</td>
								<td><input type="text" name="form[jjf]" id="kjcx_sf_jjf"  class="form-control width200"  value=""  onkeydown="onlyNum();" onkeyup="get_Totalnum('kjcx_sf')"  /></td>
							</tr>
							<tr>
								<td class="mo_dan">报告费：</td>
								<td><input type="text" name="form[baogao_fy]" id="kjcx_sf_baogao_fy"  class="form-control width200"  onkeydown="onlyNum();" value=""  onkeyup="get_Totalnum('kjcx_sf')"  /></td>
							</tr>
							<tr>
								<td class="mo_dan">总金额：</td>
								<td><input type="text" name="form[zfy]" id="kjcx_sf_zfy"  class="form-control width200"  value="" readonly /></td>
							</tr>
							<tr>
								<td class="mo_dan">交费凭单号：</td>
								<td><input type="text" name="form[sfpdh]" id="kjcx_sf_sfpdh"  class="form-control width200"  value=""   /></td>
							</tr>
							<tr>

								<td colspan="2">
									<div class="buttondiv">
										<input type="button" class="action-button" onclick="check_user_input_base_fc('get_kjcx_sf',this)" value="提交" id="tj_kdh"/>
									</div>
								</td>
								<input type="hidden" name="action" value="update_kjcx_contents" />
							</tr>
						</table>
						<div id="kjcx_sf_content"></div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 科技查新收费浮层 -->

<!-- 上传附件 -->
<div class="modal fade" id="myModa_fc_upload" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="margin-top: 80px">
	<div class="modal-dialog chery_dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="upload_bao" >

				</h4>
			</div>
			<style>
				.upload_class{
					width: 100px;
					height: 34px;
					border: 1px solid #bfbfbf;
					background-color: #cccccc;
					text-align: center;
					cursor: pointer;
					border-radius: 3px;
					display: inline-block;
					line-height: 34px;
					float: left;
				}
				#icoA{
					left: -250px;
					position: relative;
					opacity: 0;
					cursor: pointer;
				}
			</style>
			<div class="modal-footer" style="text-align:center;  min-height: 300px;">
				<div class="fc_content fc_upload fc_upload_see" >
					<form id="from_fc_upload" action="#" method="post">
						<div class="controls input input-file" for="file">

							<div class="button" style="display: none" id="hide_upload">
								<span  class="upload_class" onclick="$('#icoA').click();">选择文件</span><span style="float: left;color: red;line-height: 34px;">(只支持.doc .rar .docx .pdf后缀文件)</span>
								<input type="file" onchange="ajaxFileUpload_gy('icoA');" id="icoA" name="icoA" style="width: 100px;height: 34px;;">
							</div>
						</div>
						<div style="height: 20px;;"></div>
						<div class="show_file" id="show_upload_message_sqfj"></div><!-- 显示已经上传的附件 -->
					</form>
				</div>
				 <if condition="$school eq 81">
				<div style="margin-top:60px" class="upload_tjsh">
				<a href="javascript:void(0);" onclick="clickCheck();">提交审核</a></div>
				</if>
			</div>
		</div>
	</div>
</div>
<!-- 上传附件 -->

<!-- 修改缴费状态 -->
<div class="modal fade" id="myModa_sf_zt" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="margin-top: 80px">
	<div class="modal-dialog chery_dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" >
					修改缴费状态
				</h4>
			</div>
			<div class="modal-footer" style="text-align:center;min-height: 200px;">
				<div class="fc_content sf_zt" style="display:none">
					<form id="from_get_sf_zt" action="#" method="post">
						<table class="kd_tab" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td>缴费方式：</td>
								<td>
									<select id="sf_kjcx_model" onchange="change_sf_model_kjcx('')" name="form[fkfs]" class="form-control width200">
										<option value="1">网上支付</option>
										<option value="2">汇款</option>
										<option value="3">现金支付</option>
										<option value="4">校内转账</option>
									</select>
								</td>
							</tr>
							<tr style="height: 60px;">
								<td>缴费状态：</td>
								<td>
									<input  type="radio" value="0" name="form[zfy_sh]"> 未缴费
									<input type="radio" value="1" name="form[zfy_sh]"> 已缴费
									<input  type="radio" value="2" checked="checked"  name="form[zfy_sh]"> 预缴费
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td style="text-align: left">
									<div class="buttondiv">
										<input type="button" class="action-button" onclick="check_user_input_base_fc('get_sf_zt',this)" value="提交" id="tj_kdh"/>
									</div>
								</td>
								<input type="hidden" name="action" value="update_kjcx_contents" />
							</tr>
						</table>
						<div id="sf_zt_content"></div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 修改缴费状态 -->

<!-- 科技查新增加费用 -->
<div class="modal fade" id="myModa_kjcx_add_sf" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="margin-top: 80px">
	<div class="modal-dialog chery_dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title"  >
					增加收费
				</h4>
			</div>
			<div class="modal-footer" style="text-align:center;  min-height: 300px;">
				<form id="from_get_kjcx_add_sf" action="#" method="post">
					<table class="kd_tab" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td>增加费用(数字)：</td>
							<td><input type="text" id="kjcx_add_sf_baogao_fy" name="form[zzfy]" class="form-control width200"  value="" onkeydown="onlyNum();"/></td>
						</tr>
						<tr style="height: 170px;">
							<td>添加原因：</td>
							<td><textarea rows="5" style="width:300px !important;height: 140px;" name="form[shyy]" class="form-control "></textarea></td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td style="text-align: left">
								<div class="buttondiv">
									<input type="button" class="action-button" onclick="check_user_input_base_fc('get_kjcx_add_sf',this)" value="提交" />
								</div>
							</td>
							<input type="hidden" name="action" value="update_kjcx_contents" />
						</tr>
					</table>
					<div id="kjcx_add_sf_content"></div>
				</form>
			</div>
		</div>
	</div>
</div>
<!-- 科技查新增加费用 -->

<!-- 显示日志 -->
<div class="modal fade" id="myModa_fc_log" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="margin-top: 80px">
	<div class="modal-dialog chery_dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title"  >
					查看日志
				</h4>
			</div>
			<div class="modal-footer" style="text-align:center;  min-height: 300px;">
				<div id="fc_log_content_log"></div>
			</div>
		</div>
	</div>
</div>
<!-- 显示日志 -->

<div id="myOnPageContent" style="display:none;">
	
	<!-- 电子报告 -->
	<div class="fc_content fc_report" style="display:none">
	<form id="from_fc_report" action="#" method="post">
		<input type="text" name="form[file_name]" />
		<input type="button" class="buttons" onclick="check_user_input_base_fc('fc_report',this)" value="提交" id="tj_kdh"/>
		<div id="fc_report_content"></div>
		<input type="hidden" name="action" value="update_kjcx_contents" />
	</form>
	<div id="fc_report_div"></div>
	</div>
	<!-- 电子报告 -->
</div>

<script type="text/javascript">

	$(function() {
		toastr.options = {
			"closeButton": true,
			"debug": false,
			"progressBar": true,
			"positionClass": "toast-top-center",
			"onclick": null,
			"showDuration": "400",
			"hideDuration": "1000",
			"timeOut": "1500",
			"extendedTimeOut": "1000",
			"showEasing": "swing",
			"hideEasing": "linear",
			"showMethod": "fadeIn",
			"hideMethod": "fadeOut"
		}
	})
var save_id 		= 	'';
var save_menu_id 	= 	'';
var save_task_id	=	'';

function open_fc(id,menu_id,task_id)
{
	save_id 	 = id;
	save_menu_id = menu_id;
	save_task_id = task_id;
	
//	if(id == 'fc_upload')
//	{
//		$('#sqfj_upload').show();
//	}
//	else
//	{
//		$('#sqfj_upload').hide();
//	}
	//
	$.ajax
	(
		{
			type:'get',//可选get
//			url:'ajax_control.html',//这里是接收数据的PHP程序
			url:'{:U('Task/ajax_control')}',
			data:'action=get_kjcx_message&form[menu_id]='+menu_id+'&form[task_id]='+task_id,
			dataType:'json',
			success:function(msg)
			{

				switch(id)
				{
					case 'base_fc':
						$('#base_fc_content2').html('');
						$('#myModalLabel_title').text(msg.title); //标题
						 for(var key in msg.contents)
						 {
							if(key != 'id')
							{
								if(key	== 'bh_contents'){
									$('#base_fc_content2').append('<textarea rows="5"  style="width:300px !important;" name="form['+key+']" class="form-control width200"  id="'+key+'" ></textarea>');
								}else{
									$('#base_fc_content2').append('<input class="form-control width200" type="text" id="'+key+'" id="kdh_num" name="form[kdh_num]" style="width: 300px !important"  />');
								}
								 $('#'+key).val(msg.contents[key]); 
							}
						 }

//						$('#myModa_base_fc').modal('show');
						break;
					case 'fc_user'://显示人员列表
						$('#fc_user_select').html('');
						for(var key in msg.contents)
						{
							$("#fc_user_select").append("<option value='"+msg.contents[key].id+"'>"+msg.contents[key].username+"</option>");
						}
						$('#money').text(msg.title); //标题
//						$('#myModa_fc_user').modal('show');
					break;
					case 'fc_log'://显示日志
						$('#fc_log_content_log').html('');
						if(msg.type == 'log')
						{
							txtHtml = "<table class='table table-striped no-margin' cellspacing='1' cellpadding='1' width='100%'>";
							txtHtml += "<tr>";
							txtHtml += "<th>时间</th>";
							txtHtml += "<th>操作人员</th>";
							txtHtml += "<th>所在流程</th>";
							txtHtml += "<th>事件</th>";
							txtHtml += "</tr>";
							for(var key in msg.contents)
							{
								txtHtml += "<tr>";
								txtHtml += "<td>"+msg.contents[key].intime+"</td>";
								txtHtml += "<td>"+msg.contents[key].user_bh+"</td>";
								txtHtml += "<td>"+msg.contents[key].process_id+"</td>";
								txtHtml += "<td>"+msg.contents[key].contents+"</td>";
								txtHtml += "</tr>";
							}
						}
						else if(msg.type == 'sf_list')
						{
							txtHtml = "<table cellspacing='1' cellpadding='1' width='100%'>";
							txtHtml += "<tr>";
							txtHtml += "<th>时间</th>";
							txtHtml += "<th>操作人员</th>";
							txtHtml += "<th>收费</th>";
							txtHtml += "<th>说明</th>";
							txtHtml += "</tr>";
							
							for(var key in msg.contents)
							{
								txtHtml += "<tr>";
								txtHtml += "<td>"+msg.contents[key].intime+"</td>";
								txtHtml += "<td>"+msg.contents[key].user_name+"</td>";
								txtHtml += "<td>"+msg.contents[key].fy+"</td>";
								txtHtml += "<td>"+msg.contents[key].abs+"</td>";
								txtHtml += "</tr>";
							}
						}
						$('#fc_log_content_log').html(txtHtml);
						
					break;
					case 'fc_upload':
						show_file_message(msg);
						$('#hide_upload').show();
						$('#upload_bao').text(msg.title);
						<!-- $('.upload_tjsh a').attr('href','/kjcx/index.php/Institution/Task/ajax_control.html?action=tj_kjcx_contents&form[menu_id]=35&form[task_id]='+save_task_id); -->
						//$('.upload_tjsh a').attr('href','/index.php/Institution/Task/ajax_control.html?action=tj_kjcx_contents&form[menu_id]=35&form[task_id]='+save_task_id);
						
						break;
					case 'fc_upload_see':
						$('#upload_bao').text(msg.title);
						show_file_message(msg);
						$('#hide_upload').hide();
						$('#myModa_fc_upload').modal('show');
					break;
					case 'fc_report':
						show_doc_file(msg)
					break;
					case 'kjcx_sf':  //收费
						//第一步：赋基本值
						$('#'+id+'_cxh').val(msg.contents.cxh);
						$('#sf_kjcx_model1').val(msg.contents.fkfs);
						$('#'+id+'_cxf').val(msg.contents.cxf);
						$('#'+id+'_jjf').val(msg.contents.jjf);
						$('#'+id+'_baogao_fy').val(msg.contents.baogao_fy);
						$('#'+id+'_charge').val(msg.contents.charge);
						$('#'+id+'_sfpdh').val(msg.contents.sfpdh);
						$('#'+id+'_zfy').val(msg.contents.zfy);
						$('#'+id+'_zfy_sh').val(msg.contents.zfy - msg.contents.charge);
						$('#'+id+'_lqrq').val(msg.contents.lqrq);
//						$('#myModa_kjcx_sf').modal('show');
					break;
					case 'sf_zt':
							var numa = $("input[name='form[zfy_sh]']");
							numa.each(function(){
								if($(this).val() == msg.contents.zfy_sh ){
									$(this).attr('checked',true);
								}else{
									$(this).attr('checked',false);
								}
							})
//							$("input[name='form[zfy_sh]']").val(msg.contents.zfy_sh).attr('checked',true);
						$('#sf_kjcx_model').val(msg.contents.fkfs);
						break;
					case 'kjcx_add_sf':
						//第一步：赋基本值
						$('#'+id+'_zfy').val(msg.contents.zfy);
					break;
				}
				$('#myModa_'+id).modal('show');
				$('#'+id+'_content').html('');
				 $('#'+id+'_content').append('<input type="hidden" value="'+menu_id+'" name="form[menu_id]" />');
				 $('#'+id+'_content').append('<input type="hidden" id="task_id" value="'+task_id+'" name="form[task_id]" />');
			},
			error:function()
			{
				
			}
		}
	);
	change_fc(id);
}

/**
 * 附件上传后更新平台,这样用户就无需点击提交
 */
 function change_file_zt(data)
 {
		$.ajax
		(
			{
				type:'get',//可选get
				url:'{:U('Task/ajax_control')}',//这里是接收数据的PHP程序
				data:'action=tj_cx_files&form[type]=add&form[id]='+save_id+'&form[files_id]='+data.upload_id+'&form[menu_id]='+save_menu_id+'&form[task_id]='+save_task_id,
				dataType:'json',
				success:function(msg)
				{
					show_file_message(msg);
				}
			}
 		);
 }
 
 /**
 * 显示附件信息
 *
 */
 function show_file_message(msg)
 {
	 $('#show_upload_message_sqfj').html('');
	txtHtml = "<table cellspacing='1' cellpadding='1' width='100%'>";
	txtHtml += "<tr>";
	txtHtml += "<th align='center'>附件名称</th>";
	txtHtml += "<th align='center'>上传时间</th>";
	if(save_id == 'fc_upload')
	{
		txtHtml += "<th align='center'>操作</th>";
	}
	
	txtHtml += "</tr>";
	
	for(var key in msg.contents)
	{
		txtHtml += "<tr>";
		txtHtml += "<td><a href='{:U('Task/down_file')}?file_id="+msg.contents[key].id+"' target='_self' style='color:blue'>"+msg.contents[key].title+"</a></td>";
		txtHtml += "<td>"+msg.contents[key].create_time+"</td>";
		if(save_id == 'fc_upload')
		{
			txtHtml += "<td><a href='javascript:;'  style='color:blue' onclick='del_file_message(this)'>删除</a><input type='hidden' name='files_arr[]' value='"+msg.contents[key].id+"' /></td>";
		}
		txtHtml += "</tr>";
	}
	$('#show_upload_message_sqfj').html(txtHtml);
 }
 
 /**
 * 删除附件
 *
 */
 function del_file_message(obj,files_id)
 {
	if(confirm('是否确认删除，删除后无法恢复'))
	{
		$(obj).parent().parent().remove();
		
		var eles = document.getElementsByName('files_arr[]');
		var vals = "";
	    for(var i=0;i<eles.length;i++)
	    {
			vals+=eles[i].value+",";
	    }
	    vals = vals.length>0?(vals.substring(0,vals.length-1)):("");
	    
	    $.ajax
		(
			{
				type:'get',//可选get
				url:'{:U('Task/ajax_control')}',//这里是接收数据的PHP程序
				data:'action=tj_cx_files&form[type]=update&form[id]='+save_id+'&form[files_id]='+vals+'&form[menu_id]='+save_menu_id+'&form[task_id]='+save_task_id,
				dataType:'json',
				success:function(msg)
				{
					show_file_message(msg);
				}
			}
 		);
	}
 }
 
 /**
 * 删除电子版
 *
 */
 function del_file_doc_message(obj,files_id)
 {
	if(confirm('是否确认删除，删除后无法恢复'))
	{
		$(obj).parent().parent().remove();
		
		var eles = document.getElementsByName('files_doc_arr[]');
		var vals = "";
	    for(var i=0;i<eles.length;i++)
	    {
			vals+=eles[i].value+",";
	    }
	    vals = vals.length>0?(vals.substring(0,vals.length-1)):("");
	    $.ajax
		(
			{
				type:'get',//可选get
				url:'ajax_control.html',//这里是接收数据的PHP程序
				data:'action=tj_cx_files_doc&form[type]=update&form[id]='+save_id+'&form[files_id]='+vals+'&form[menu_id]='+save_menu_id+'&form[task_id]='+save_task_id,
				dataType:'json',
				success:function(msg)
				{
					show_doc_file(msg);
				}
			}
 		);
	}
 }
 
/**
 * 提交修改的内容
 */
function check_user_input_base_fc(fc_type,obj)
{
	
	$.ajax({
        cache: true,
        type: "POST",
        url:"{:U('Task/ajax_control')}",
        data:$('#from_'+fc_type).serialize(),// 你的formid
        async: false,
        dataType:'json',
        error: function(request) {
			toastr.error(request.return_message,'出错信息');
			setTimeout(function(){
				$(obj).prop('disabled',false);
			},1500);
        },
        success: function(data) {
			switch(fc_type)
			{
				case 'fc_report':
					show_doc_file(data);
					break;
				case 'base_fc':
					var task_id = $('#task_id').val();
					$('.cxh_'+task_id).html($('#cxh').val());
//					$('#myModa_base_fc').modal('hide');
					break;
//				case 'fc_user':
//					$('#myModa_fc_user').modal('hide');
//					break;
//				case 'get_kjcx_sf':
//					$('#myModa_kjcx_sf').modal('hide');
//					break;
				case 'get_sf_zt':

//					$('#myModa_sf_zt').modal('hide');
					break;
//				case 'get_kjcx_add_sf':
//					$('#myModa_kjcx_add_sf').modal('hide');
//					break;
			}
			
			if(data.state == 2){
				alert(data.return_message);return false;
			}
			$(obj).prop('disabled',true);
			if (data.state == 1) {
				toastr.success(data.return_message + ' 页面即将自动跳转~','操作成功');
			}else{
				toastr.success(data.return_message ,'操作成功');
			}
			setTimeout(function(){
				$(obj).prop('disabled',false);
				location.reload();
			},1500);

        }
    });
}
/**
 * 显示查新报告电子版
 */
function show_doc_file(msg)
{

	 $('#fc_report_div').html('');
		txtHtml = "<table cellspacing='1' cellpadding='1' width='100%'>";
		txtHtml += "<tr>";
		txtHtml += "<th align='center'>附件名称6</th>";
		txtHtml += "<th align='center'>上传时间</th>";
		if(save_id == 'fc_upload')
		{
			txtHtml += "<th align='center'>操作</th>";
		}
		txtHtml += "</tr>";
		for(var key in msg.contents)
		{
			txtHtml += "<tr>";
			txtHtml += "<td><a href='?h=kjcx_report_see&file_id="+msg.contents[key].id+"' target='_self'>"+msg.contents[key].file_name+"</a></td>";
			txtHtml += "<td>"+msg.contents[key].intime+"</td>";
			if(msg.contents[key].del_tag == 1)
			{
				txtHtml += "<td><a href='javascript:;' onclick='del_file_doc_message(this)'>删除</a><input type='hidden' name='files_doc_arr[]' value='"+msg.contents[key].id+"' /></td>";
			}
			
		}
		$('#fc_report_div').html(txtHtml);	
}
//收费
function get_Totalnum(id){
	var cxf	=	$('#'+id+'_cxf').val();
	var jjf =	$('#'+id+'_jjf').val();
	var bgf	=	$('#'+id+'_baogao_fy').val();
	var total_fy = 0;
	
	if(parseInt(cxf) >0 ){total_fy = total_fy+parseInt(cxf);}
	if(parseInt(jjf) >0 ){total_fy = total_fy+parseInt(jjf);}
	if(parseInt(bgf) >0 ){total_fy = total_fy+parseInt(bgf);}
	
	$('#'+id+'_zfy').val(total_fy);
}

function change_fc(id)
{
	$('.fc_content').hide();
	$('.'+id).show();
}
//上传查新文档的操作
upload_tag = 0;
function sc_fun_files()
{
	if(upload_tag == 0)
	{
		if(confirm("是否上传文件？")){upload_tag = 1;ajaxFileUpload_fj_cx('sqfj','cx_file');}
	}
	
}

/**
 * 只能输入数字
 */
function onlyNum()
{
  if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105) || event.keyCode == 8))
  
    event.returnValue=false;
	//alert(event.keyCode);
  
}

//提交审核
function clickCheck()
{

	//进行异步提交
	$.ajax
	(
		{
			type:'get',//可选get
			url:'{:U('Task/ajax_control')}',//这里是接收数据的PHP程序
			data:'action=tj_kjcx_contents&form[menu_id]=35&form[task_id]='+save_task_id,
			dataType:'json',
			success:function(msg)
			{
				if (msg['state'] == 1) {
					toastr.success(msg['contents'] + ' 页面即将自动跳转~','操作成功');
				}else{
					toastr.success(msg['contents'] ,'操作失败');
				}
				setTimeout(function(){
					location.reload();
				},1500);
			}
		}
	);
}

</script>